<script setup lang="ts">
interface Props {
  /** 标题名称 */
  title: string;
  /** 标题 id */
  menuId: string;
  /** 数值 */
  count?: number | null;
  /** 小标题 */
  isSmall?: boolean;
}

const { title, menuId, isSmall, count } = defineProps<Props>();
</script>

<template>
  <div :class="['enterprise-title', { 'small-title': isSmall }]">
    <div class="hide-dom" :id="title + '_' + menuId" />
    {{ title }}
    <span v-if="count">{{ count }}</span>
  </div>
</template>

<style scoped lang="scss">
.enterprise-title {
  font-weight: bold;
  font-size: 16px;
  color: #000000;
  position: relative;
  .hide-dom {
    position: absolute;
    top: -65px;
    left: 50%;
  }
  &.small-title {
    color: #333333;
    font-size: 14px;
  }
}
</style>
